const closeOrder = require('./closeOrder/index');
const queryOrder = require('./queryOrder/index');
const queryRefunOrder = require('./queryRefunOrder/index');


// 云函数入口函数
exports.main = async (event, context) => {
  switch (event.type) {
    case 'closeOrder':
      return await closeOrder.main(event, context);
    case 'queryOrder':
      return await queryOrder.main(event, context);
    case 'queryRefunOrder':
      return await queryRefunOrder.main(event, context);
    default:
      return {
        errCode: -1,
        errMsg: 'TYPE_NOT_EXIST'
      }
  }
}